﻿using System;
using System.Windows.Controls;
using ShadeTree.Binding.Elements;

namespace ShadeTree.Binding.WPF
{
    public class ButtonElement : ScreenElement<Button>
    {
        public ButtonElement(Button control) : base(control)
        {
            this.Alias = control.Content.ToString();
        }

        public void OnClick(Action action)
        {
            BoundControl.Click += delegate { action(); };
        }
    }
}